<?PHP
require_once('../database/database.class.php');
require_once('../output.php');

class Board
{
	private $mDatabase;
	private $mData;
	
	public function __construct()
	{
		$this->mDatabase = Database::getInstance();
		$this->mDatabase->connect();
		
		$this->mData = Output::getInstance();
	}
	
	public function loadSections()
	{
		$sections = $this->mDatabase->selectAssoc('SELECT * FROM forum_groups');
		$this->mData->add('sections',$sections);
		
		$forums = $this->mDatabase->selectAssoc('SELECT * FROM forums');
		$this->mData->add('forums',$forums);
	}
	
	public function send()
	{
		$this->mData->send();
	}
}
?>